home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1986, 1988, 1989 the Free Software Foundation, Inc.
- *
- * This file is part of GAWK, the GNU implementation of the
- * AWK Progamming Language.
- *
- * GAWK is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * GAWK is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GAWK; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <math.h>
- #include "awk.h"
-
- void *memcpy();
-
-
-
- void bzero(p,n)
- void *p;
- int n;
- {
- memset(p,'\0',n);
- }
-
-
- FILE *popen(s,mode)
- char *s,*mode;
- {
- fprintf(stderr,"Sorry, pipes are not implemented.\n");
- exit(20);
- }
-
- pclose(fp)
- FILE *fp;
- {
- fprintf(stderr, "Sorry, pipes are not implemented.\n");
- exit(21);
- }
-
- int bcmp(d,d2,mcnt)
- char *d,*d2;
- int mcnt;
- {
- if (strncmp(d,d2,mcnt))
- return(1);
- else return(0);
- }
-
- char *index(s, c)
- char *s,c;
- {
-
- return (strchr(s,c));
- }
-
- int pipe(fildes)
- int fildes[2];
- {
-
- fprintf(stderr,"Sorry, pipes are not implemented.\n");
- exit(22);
-
- }
-
- int fork()
- {
-
- fprintf(stderr,"Sorry, can't fork.\n");
- exit(23);
-
- }
-
- int wait(junk)
- void * junk;
- {
-
- fprintf(stderr,"Sorry, can't wait.\n");
- exit(24);
- }
-
- int
- dup2 (old, new)
- int old, new;
- {
-
- fprintf(stderr,"Sorry, no dup2.\n");
- exit(25);
-
- }
-
- pointer xmalloc(n)
- unsigned int n;
- {
- extern pointer malloc();
- pointer cp;
- static char mesg[] = "xmalloc: no memory!\n";
-
- cp = malloc(n);
- if (! cp) {
- write (2, mesg, sizeof(mesg) - 1);
- exit(1);
- }
- return cp;
- }
-
-